﻿@model CustomerAddressEditModel
@using Nop.Web.Models.Customer;
@{
    Layout = "~/Views/Shared/_ColumnsTwo.cshtml";

    //title
    Html.AddTitleParts(T("PageTitle.Account").Text);
}
@section left
{
    @Html.Partial("MyAccountNavigation", Model.NavigationModel, new ViewDataDictionary())
}

@using (Html.BeginForm())
{
    <div class="page account-page address-edit-page">
        <div class="panel panel-default form-panel">
        <div class="panel-heading">
            <h3>@T("Account.MyAccount") - @T("Account.CustomerAddresses.Edit")</h3>
        </div>
            <div class="panel-body">
                @{
                    var dataDictAddress = new ViewDataDictionary();
                    //Merge ModelState (required for validation)
                    dataDictAddress.ModelState.Merge(ViewData.ModelState);
                    dataDictAddress.TemplateInfo.HtmlFieldPrefix = "Address";
                    @Html.Partial("_CreateOrUpdateAddress", Model.Address, dataDictAddress)          
                }
                <div class="buttons">
                    <input type="submit" class="button-1 save-address-button btn btn-default" value="@T("Common.Save")" />                       
                </div>
            </div>
        </div>
    </div>
}